/**
 * Created by aa on 2016/11/18.
 */
//新闻类表格数据源构造
module.exports = function newsContructer(orignData, pageSize,curPage) {
    let result = {page: curPage, totalPage: Math.ceil(orignData.size / pageSize), content: []};
    for (var i = 0; i < orignData.result.length; i++) {
        var resultItem = orignData.result[i];
        var contentItem = {
            mainImg: resultItem.picAddress,
            href: '/hkfsDetail?id=' + resultItem.id,
            title: resultItem.title,
            content: resultItem.summary,
            date: resultItem.ctsStr
        };
        result.content.push(contentItem);
    }
    return result;
};